<template>
  <el-table
    ref="multipleTable"
    :data="tableData"
    style="width: 100%;"
    stripe
    :size="detailSize"
    max-height="500px"
    class="table-list table-fxied-height"
  >
    <el-table-column label="序号" type="index" width="55" align="center" />
    <el-table-column prop="name" :show-overflow-tooltip="true" label="企业名称" min-width="150" align="center" />
    <el-table-column prop="creditCodePic" label="信用代码" :show-overflow-tooltip="true" min-width="150" align="center" />
    <el-table-column prop="legalperson" label="联系人" min-width="80" align="center" />
    <el-table-column prop="legalpersonMobile" label="联系电话" min-width="150" align="center" />
  </el-table>
</template>

<script>
// 页面接口
import { EnterpriseBySupervise } from '@/api/projectInspection/PatrolList'
export default {
  name: 'PatrolEnterprise',
  props: {
    proId: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      tableData: [],
      typeOptions: []
    }
  },
  watch: {
    proId: {
      immediate: true,
      handler(value) {
        value && this.getList(value)
      }
    }
  },
  mounted() {
  },
  methods: {
    // 获取列表
    async getList(proId) {
      const { data } = await EnterpriseBySupervise({ proId: proId })
      this.tableData = data
    }
  }
}
</script>

<style lang='scss' scoped>
.table-fxied-height {
  max-height: 396px; // 最多10条数据
  overflow-y: scroll;
}
</style>
